package com.finance.rule.dao;

import com.finance.framework.lang.Page;
import com.finance.rule.bean.pojo.MixSectionRule;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Created by CBWL on 2017/3/17.
 */
@Component
public interface MixSectionMapper {
    List<MixSectionRule> listByPage(Page page);

    MixSectionRule getById(Long id);

    int countByCode(String code);

    /**
     *查找除Id以外的数据 存在code的数量
     * 以此为跟新数据的前提条件
     * */
    int countByCodeAndId(@Param("code") String code, @Param("id") Long id);

    int add(MixSectionRule mixSectionRule);

    int update(@Param("mixSectionRule") MixSectionRule mixSectionRule);

    int del(@Param("uid") String uid, @Param("ids") List<String> ids);

}
